import service from '../utils/axios'

export interface JournalList {
  phone: string
  nickname: string
  module: string
  functionName: string
  createTime: string
  ip: string
  description: string
}

export interface JournalListParams {
  phone?: string
  nickname?: string
  module?: string
  functionName?: string
  ip?: string
  startTime?: string
  endTime?: string
  pageNum: number
  pageSize: number
}

export interface JournalListResponse {
  code: number
  message: string
  data: {
    list:JournalList[]
    total:number
  }
}

export const getJournalList = (
  params: JournalListParams
): Promise<JournalListResponse> => {
  return service.post('/admin/journal/list', params)
    .then((res) => res.data);
};

